<!DOCTYPE html>
<html lang="zh_CN">

<head>
    <meta charSet="utf-8" />
    <meta http-equiv="x-ua-compatible" content="ie=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <title>TinyMCE</title>
</head>

<body>
    <h1>TinyMCE快速开始示例</h1>
    <form method="post">
        <textarea id="textarea">Hello, World!</textarea>
    </form>
    <p>
        <a href="https://www.tiny.cloud/get-tiny" target="_blank">TinyMCE下载</a> |
        <a href="https://www.tiny.cloud/get-tiny/language-packages/" target="_blank">TinyMCE语言包下载</a> |
        <a href="https://www.tiny.cloud/docs/tinymce/latest/" target="_blank">TinyMCE官方文档</a> |
        <a href="http://tinymce.ax-z.cn/" target="_blank">TinyMCE中文文档</a>
    </p>
    <script src="./tinymce/tinymce.min.js"></script>
    <script>
        tinymce.init({
            selector: '#textarea',
            language: 'zh-Hans',
            height: 600,
            external_plugins: {
                'batchUploadImage': `../tinymce-external/batchUploadImage/plugin.min.js`,
            },
            plugins: ['table', 'link', 'image', 'batchUploadImage', 'media', 'fullscreen', 'code', 'help'],
            skin: 'tinymce-5',
            toolbar: 'undo redo | formatselect | bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table link removeformat | image batchUploadImage code help',
            images_upload_handler: blobInfo => new Promise((resolve, reject) => {
                resolve('https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png');
            }),
        });
    </script>
</body>

</html>